import React from 'react';
import { useLocation } from 'react-router-dom';
import Masks from '../../components/Order/Masks/Masks';
import OrderSearch from '../../components/Order/OrderSearch/OrderSearch';
import TabCom from '../../components/Order/TabCom/TabCom';

export default function OrderManagementLayer() {
  const location = useLocation();
  const { state } = location;
  const layout = [
    [<OrderSearch />],
    [<TabCom defaultVal={state ? state.defaultVal : ''} />],
  ];
  return (
    <>
      {layout.map((el, i) => (
        <Masks com={el} key={i}></Masks>
      ))}
    </>
  );
}
